Dynomotion

Group: DynoMotion Message: 15391 From: lmp582002 Date: 2/23/2018
Subject: Hobby Servos on JP4

Howdy,


I have been running hobby servos on JP6 according to this documentation. Seems to work well:


http://www.dynomotion.com/wiki/index.php?title=Driving_Hobby_Servos


I have an existing machine that is using all of the IO on JP6, I am wondering if I can drive my hobby servos on JP4. I dont understand the code well enough. It is using a PWM generator, but I dont think JP4 has a generator. Would it be as simple as assigning JP4 IO instead of JP6?


    SetBitDirection(16,1);  // define bit as an output
    ClearBit(16);
    SetBitDirection(17,1);  // define bit as an output
    ClearBit(17);
    SetBitDirection(18,1);  // define bit as an output
    ClearBit(18);
Then everywhere bit 26 is called out I would change it to 16?
    
Thanks,
Scott 


Group: DynoMotion Message: 15392 From: Tom Kerekes Date: 2/23/2018
Subject: Re: Hobby Servos on JP4
Hi Scott,

No, JP4 doesn't have any PWM outputs.

What is currently using JP6?  Could that be moved to JP4?

Regards
TK

On 2/23/2018 4:32 PM, lmp582002@... [DynoMotion] wrote:
 

Howdy,


I have been running hobby servos on JP6 according to this documentation. Seems to work well:


http://www.dynomotion.com/wiki/index.php?title=Driving_Hobby_Servos


I have an existing machine that is using all of the IO on JP6, I am wondering if I can drive my hobby servos on JP4. I dont understand the code well enough. It is using a PWM generator, but I dont think JP4 has a generator. Would it be as simple as assigning JP4 IO instead of JP6?


    SetBitDirection(16,1);  // define bit as an output
    ClearBit(16);
    SetBitDirection(17,1);  // define bit as an output
    ClearBit(17);
    SetBitDirection(18,1);  // define bit as an output
    ClearBit(18); Then everywhere bit 26 is called out I would change it to 16?
     Thanks, Scott 



Group: DynoMotion Message: 15393 From: lmp582002 Date: 2/23/2018
Subject: Re: Hobby Servos on JP4
All my stepper motor encoders are plugged in, I think I can move them. Just a bit of work to do so.